from django.db import models
from django.forms import ModelForm

class Plan(models.Model):
  owner     = models.IntegerField()
  title     = models.TextField()
  detail    = models.TextField()
  place     = models.TextField()
  start     = models.DateTimeField()
  limit     = models.DateTimeField()
  is_allday = models.BooleanField()
  publish_date  = models.DateTimeField(auto_now_add=True)
  last_mod_date = models.DateTimeField(auto_now=True)

class PlanForm(ModelForm):
  class Meta:
    model = Plan
    exclude = ('owner',)
